<?php
	session_start();
	$conn = @mysql_connect("localhost","root","lks112700.");
	if(!$conn){
		die("数据库连接失败:".mysql_error());
	}
	mysql_select_db("person",$conn);

	$serch_name = $_POST['serch'];
	$db1 = 'select * from product where name =$serch_name';
	if($query = mysql_query($db1,$conn))
	{
		$result = mysql_fetch_array($query,MYSQL_ASSOC);
		$array1 = json_encode($result)
		echo '$array1';
	}
	else
	{
		exit("抱歉，没有您想要的东西。") ;

	}
?>